<?php
namespace app\admin\validate;
use think\Validate;

class BlogValidate extends Validate {
    protected $rule = [
        'title' => 'require|max:20',
        'content' => 'require',
    ];

    protected $message = [
        'title.require' => '标题不能为空',
        'title.max' => '标题长度不能超过20个字符',
        'content.require' => '文章内容不能为空',
    ];

}